package models

import "gorm.io/gorm"

type Setmeal struct {
	gorm.Model
	Id            int            `gorm:"column:id;type:int(11);" json:"id"`
	Name          string         `gorm:"column:name;type:varchar(32);" json:"name"`
	Price         float64        `gorm:"column:price;type:decimal(10,2);" json:"price"`
	Status        *int           `gorm:"column:status;type:int(2);" json:"status"`
	CategoryId    int            `gorm:"column:category_id;type:int(11);" json:"category_id"`
	Image         string         `gorm:"column:image;type:varchar(255);" json:"image"`
	Description   string         `gorm:"column:description;type:varchar(255);" json:"description"`
	SetmealDishes []*SetmealDish `gorm:"foreignKey:setmeal_id;references:id;constraint:OnDelete:CASCADE" json:"setmeal_dishes"`
}

func (Setmeal) TableName() string {
	return "setmeal"
}
